home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 151-175 / disk_172 / spiff / comment.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  2KB  |  85 lines

  1. /*                        Copyright (c) 1988 Bellcore
  2. **                            All Rights Reserved
  3. **       Permission is granted to copy or use this program, EXCEPT that it
  4. **       may not be sold for profit, the copyright notice must be reproduced
  5. **       on copies, and credit should be given to Bellcore where it is due.
  6. **       BELLCORE MAKES NO WARRANTY AND ACCEPTS NO LIABILITY FOR THIS PROGRAM.
  7. */
  8.  
  9. #ifndef W_INCLUDED
  10.  
  11. #include <stdio.h>
  12.  
  13. #define _W_COMWORD    16
  14. #define _W_COMMAX    20
  15. #define _W_BOLMAX    20
  16. #define _W_LITMAX    20
  17.  
  18. /*
  19. **    these three data structures used to be much
  20. **        different.  eventually, the differences
  21. **        have disappeared as the code has evolved.
  22. **        obviously, they should now be collapsed.
  23. **        someday . . .
  24. */
  25. typedef struct {
  26.     char begin[_W_COMWORD];
  27.     char end[_W_COMWORD];
  28.     char escape[_W_COMWORD];
  29. } _W_bolstruct, *W_bol;
  30.  
  31. typedef struct {
  32.     char begin[_W_COMWORD];
  33.     char end[_W_COMWORD];
  34.     char escape[_W_COMWORD];
  35.     int nestbit;
  36. } _W_comstruct, *W_com;
  37.  
  38. typedef struct {
  39.     char begin[_W_COMWORD];
  40.     char end[_W_COMWORD];
  41.     char escape[_W_COMWORD];
  42. } _W_litstruct, *W_lit;
  43.  
  44. #define W_bolbegin(ptr)        (ptr->begin)
  45. #define W_bolend(ptr)        (ptr->end)
  46. #define W_bolescape(ptr)    (ptr->escape)
  47.  
  48. #define W_litbegin(ptr)        (ptr->begin)
  49. #define W_litend(ptr)        (ptr->end)
  50. #define W_litescape(ptr)    (ptr->escape)
  51.  
  52. #define W_combegin(ptr)        (ptr->begin)
  53. #define W_comend(ptr)        (ptr->end)
  54. #define W_comescape(ptr)    (ptr->escape)
  55.  
  56. extern char _W_bolchar;
  57. extern char _W_eolchar;
  58.  
  59. #define W_setbolchar(x)        (_W_bolchar = x)
  60. #define W_seteolchar(x)        (_W_eolchar = x)
  61.  
  62. extern W_bol W_isbol();
  63. extern W_lit W_islit();
  64. extern W_com W_iscom();
  65.  
  66. extern int W_is_bol();
  67. extern int W_is_lit();
  68. extern int W_is_com();
  69.  
  70. extern _W_bolstruct _W_bols[];
  71. extern _W_litstruct _W_lits[];
  72. extern _W_comstruct _W_coms[];
  73.  
  74. extern void W_clearcoms();
  75. extern void W_clearlits();
  76. extern void W_addcom();
  77. extern void W_addlit();
  78.  
  79. #define W_BOLNULL        ((W_bol)0)
  80. #define W_COMNULL        ((W_com)0)
  81. #define W_LITNULL        ((W_lit)0)
  82.  
  83. #define W_INCLUDED
  84. #endif
  85.